// 定义对象的结构
interface Option {
    test: string,
    login: string,
    register: string,
    admin_login: string,
    admin_register: string,
    logged: string,
    nickName: string,
    admin: { all?: string, items?: string, remove: string },
    user: { all: string, remove: string, list?: string, items: string },
    content: { update: string, detail: string, add: string, all: string, remove: string, list?: string, items: string, search: string },
    video: {deleteImg?:string, upload?: string, merge?: string, update: string, detail: string, add_video_pic: string, all: string, remove: string, list?: string, items: string, search: string },
    advert: { delete: string, publish: string, modify: string, remove: string, list: string, detail: string, search: string },
    navigate: { add: string, modify: string, remove: string, list: string, detail: string },
    article: { all: string, add: string, remove: string, list: string, items: string, detail: string, search?: string, update: string },
    signin2: { isSignin?: string, all: string, total: string, add: string, remove: string, list?: string, items: string },
    comment: {
        article: {
            add?: string,
            remove?: string,
            remove_admin?: string,
            list?: string,
            items?: string,
            all?: string,
        },
        content: {
            add?: string,
            remove?: string,
            list?: string,
            items?: string,
            all?: string,
        }
    },
    reply: {
        article: {
            add?: string,
            remove?: string,
            list?: string,
            items?: string,
            all?: string,
        },
        content: {
            add?: string,
            remove?: string,
            list?: string,
            items?: string,
            all?: string,
        }
    }
}
// 导出接口地址配置对象
// 中台管理涉及的接口
export let api: Option = {
    test: '/test',
    login: '/user/login',
    register: '/user/register',
    admin_login: '/admin/login',
    admin_register: '/admin/register',
    logged: '/logged',
    // nickName: '/user/nickName',
    nickName: '/admin/nickName',
    admin: {
        all: '/admin/all',
        items: '/admin/items',
        remove: '/admin/remove'
    },
    user: {
        all: '/user/all',
        list: '/user/list',
        items: '/user/items',
        remove: '/user/remove',
    },
    advert: {
        publish: '/advert/publish',
        modify: '/advert/modify',
        remove: '/advert/remove',
        list: '/advert/list',
        detail: '/advert/detail',
        search: '/advert/search',
        delete: '/advert/delete'
    },
    navigate: {
        add: '/navigate/add',
        modify: '/navigate/modify',
        remove: '/navigate/remove',
        list: '/navigate/list',
        detail: '/navigate/detail'
    },
    article: {
        add: '/article/add',
        update: '/article/update',
        remove: '/article/remove',
        list: '/article/list',
        detail: '/article/detail',
        items: '/article/items',
        search: '/article/search',
        all: '/article/all'
    },
    content: {
        all: '/content/all',
        add: '/content/add',
        remove: '/content/remove',
        list: '/content/list',
        detail: '/content/detail',
        items: '/content/items',
        search: '/content/search',
        update: '/content/update'
    },
    // 视频部分
    video: {
        all: '/video/all',
        // add: '/video/add',
        add_video_pic: '/video/add_video_pic',
        remove: '/video/remove',
        list: '/video/list',
        detail: '/video/detail',
        items: '/video/items',
        search: '/video/search',
        update: '/video/update',
        upload: '/video/upload',
        merge: '/video/merge',
        deleteImg: '/video/deleteImg',
    },
    signin2: {
        all: '/signin2/all',
        list: '/signin2/list',
        items: '/signin2/items',
        add: '/signin2/add',
        remove: '/signin2/remove',
        total: '/signin2/total',
        isSignin: '/signin2/isSignin',
    },
    comment: {
        article: {
            add: '/comment/article/add',
            remove: '/comment/article/remove',
            remove_admin: '/comment/article/remove_admin',
            list: '/comment/article/list',
            items: '/comment/article/items',
            all: '/comment/article/all',
        },
        content: {
            add: '/comment/content/add',
            remove: '/comment/content/remove',
            list: '/comment/content/list',
            items: '/comment/content/items',
            all: '/comment/content/all',
        },
    },
    reply: {
        article: {
            add: '/reply/article/add',
            remove: '/reply/article/remove',
            list: '/reply/article/list',
            items: '/reply/article/items',
            all: '/reply/article/all',
        },
        content: {
            add: '/reply/content/add',
            remove: '/reply/content/remove',
            list: '/reply/content/list',
            items: '/reply/content/items',
            all: '/reply/content/all',
        },
    }
}